home *** CD-ROM | disk | FTP | other *** search
Wrap
/*******************************/ /* ZoomBlur V2.0 */ /* Image Engineer Macro script */ /* by Simon Edwards */ /* */ /* This creates a sort of zoom */ /* motion blur effect. */ /*******************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit PROJECT_INFO arg(1) WIDTH sourcewidth=RESULT PROJECT_INFO arg(1) HEIGHT sourceheight=RESULT form='FORM "Zoom Blur" "Ok|Cancel"' form=form||' CYCLE,"Size of Blur (pixels):","1|2|4|8|16|32|64",0' form=form||' CYCLE,"Method:","Blur|Max|Min",0' form reply=RESULT if word(reply,1)=0 then exit times=word(reply,2) stepsize=2 select when word(reply,3)=0 then method="MIX 50" when word(reply,3)=1 then method="MAX" when word(reply,3)=2 then method="MIN" end SCALE arg(1) sourcewidth+stepsize sourceheight+stepsize BEST temp=RESULT MARK temp PRIMARY MARK arg(1) SECONDARY COMPOSITE (sourcewidth-sourcewidth-stepsize)/2 (sourceheight-sourceheight-stepsize)/2 method temp2=RESULT CLOSE temp stepsize=stepsize*2 do while times~=0 SCALE temp2 sourcewidth+stepsize sourceheight+stepsize BEST temp=RESULT MARK temp PRIMARY MARK temp2 SECONDARY COMPOSITE (sourcewidth-sourcewidth-stepsize)/2 (sourceheight-sourceheight-stepsize)/2 method temp3=RESULT CLOSE temp2 CLOSE temp temp2=temp3 stepsize=stepsize*2 times=times-1 end exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end